<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>八字排盘</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft YaHei", "SimHei", sans-serif;
        }
        
        body {
            background: #f5e8d3 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill-opacity="0.05" fill="%23000" width="100" height="100"/></svg>');
            color: #333;
            padding: 20px;
            line-height: 1.6;
            max-width: 100%;
            margin: 0 auto;
        }
        
        .container {
            max-width: 900px;
            margin: 0 auto;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            border: 1px solid #d4b16a;
        }
        
        @media (min-width: 1200px) {
            .container {
                max-width: 1000px;
            }
        }
        
        @media (min-width: 1600px) {
            .container {
                max-width: 1100px;
            }
        }
        
        header {
            background: linear-gradient(to right, #8b0000, #a52a2a);
            color: #fff;
            padding: 20px;
            text-align: center;
            border-bottom: 5px solid #d4b16a;
            position: relative;
        }
        
        h1 {
            font-size: 28px;
            margin-bottom: 10px;
            text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
        }
        
        .subtitle {
            font-size: 16px;
            opacity: 0.9;
        }
        
        .main-content {
            display: flex;
            flex-direction: column;
            padding: 20px;
            gap: 20px;
            width: 100%;
        }
        
        .input-section {
            width: 100%;
            padding: 20px;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            border-radius: 8px;
            border: 1px solid #e0d5c0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .input-section.collapsed {
            max-height: 80px;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .input-section.expanded {
            max-height: none;
        }
        
        .input-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            margin-bottom: 15px;
            padding: 10px;
            border-bottom: 2px solid #d4b16a;
            -webkit-user-select: none;
            user-select: none;
            transition: background-color 0.2s ease;
        }
        
        .input-section-header:hover {
            background-color: rgba(212, 177, 106, 0.1);
            border-radius: 4px;
        }
        
        .input-section-header h2 {
            margin: 0;
            color: #8b0000;
        }
        
        .toggle-icon {
            font-size: 18px;
            color: #8b0000;
            transition: transform 0.3s ease;
        }
        
        .input-section.collapsed .toggle-icon {
            transform: rotate(180deg);
        }
        
        .input-section.collapsed .input-section-content {
            display: none;
        }
        
        .input-section-content {
            animation: fadeIn 0.3s ease;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .result-section {
            width: 100%;
            padding: 20px;
            background: #fff;
            border-radius: 8px;
            border: 1px solid #e0d5c0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            max-width: 100%;
        }
        
        @media (min-width: 1200px) {
            .result-section {
                padding: 30px;
            }
            
            .input-section {
                padding: 25px;
            }
        }
        
        .result-box {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .result-section h2 {
            color: #8b0000;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #d4b16a;
        }
        
        .result-header-spacing {
            margin-top: 20px !important;
        }
        
        .input-section h2 {
            color: #8b0000;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #d4b16a;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #5c3317;
        }
        
        input, select {
            width: 100%;
            padding: 10px;
            border: 1px solid #d4b16a;
            border-radius: 4px;
            background: #fffaf0;
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        input:focus, select:focus {
            outline: none;
            border-color: #8b0000;
            box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
            background: #fff;
        }
        
        input[readonly] {
            cursor: pointer;
        }
        
        input[readonly]:hover {
            background: #fff;
            border-color: #8b0000;
        }
        
        .radio-group {
            display: flex;
            gap: 15px;
        }
        
        .radio-option {
            display: flex;
            align-items: center;
        }
        
        .radio-option input {
            width: auto;
            margin-right: 5px;
        }
        
        button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(to bottom, #8b0000, #a52a2a);
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
            margin-top: 10px;
            transition: all 0.3s;
            position: relative;
        }
        
        button:hover {
            background: linear-gradient(to bottom, #a52a2a, #8b0000);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        button:disabled {
            background: #cccccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .loading-spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
            margin-right: 10px;
        }
        
        .loading-spinner.show {
            display: inline-block;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .datetime-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        
        .date-input, .time-input {
            position: relative;
        }
        
        .date-input::after, .time-input::after {
            content: "📅";
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            font-size: 18px;
            opacity: 0.6;
            transition: opacity 0.3s ease;
        }
        
        .time-input::after {
            content: "⏰";
        }
        
        .date-input:hover::after, .time-input:hover::after {
            opacity: 1;
        }
        
        .result-box {
            margin-top: 20px;
        }
        
        .result-header {
            background: #8b0000;
            color: white;
            padding: 10px;
            text-align: center;
            border-radius: 4px 4px 0 0;
            margin-bottom: 15px;
        }
        
        .bazi-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            margin-bottom: 20px;
            max-width: 100%;
        }
        
        @media (min-width: 1200px) {
            .bazi-grid {
                gap: 15px;
                margin-bottom: 25px;
            }
            
            .bazi-column {
                padding: 20px;
            }
        }
        
        .bazi-column {
            text-align: center;
            padding: 15px;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            border-radius: 8px;
            border: 2px solid #d4b16a;
            position: relative;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        .bazi-column:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-color: #8b0000;
        }
        
        .bazi-title {
            font-weight: bold;
            color: #8b0000;
            margin-bottom: 10px;
            border-bottom: 1px solid #d4b16a;
            padding-bottom: 5px;
        }
        
        .bazi-content {
            font-size: 20px;
            font-weight: bold;
            color: #5c3317;
            margin-bottom: 5px;
        }
        
        .bazi-detail {
            font-size: 14px;
            color: #8b0000;
        }
        
        .wuxing {
            position: absolute;
            bottom: 5px;
            right: 5px;
            font-size: 12px;
            color: #8b0000;
            background: #f9f3e9;
            padding: 2px 5px;
            border-radius: 3px;
        }
        
        .dayun-list, .liunian-list {
            margin-top: 15px;
        }
        
        .list-title {
            font-weight: bold;
            color: #8b0000;
            margin-bottom: 10px;
            border-bottom: 1px solid #d4b16a;
            padding-bottom: 5px;
        }
        
        .list-container {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid #e0d5c0;
            border-radius: 8px;
            padding: 10px;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        .list-container::-webkit-scrollbar {
            width: 8px;
        }
        
        .list-container::-webkit-scrollbar-track {
            background: #f9f3e9;
            border-radius: 4px;
        }
        
        .list-container::-webkit-scrollbar-thumb {
            background: #d4b16a;
            border-radius: 4px;
        }
        
        .list-container::-webkit-scrollbar-thumb:hover {
            background: #8b0000;
        }
        
        .list-item {
            padding: 10px;
            border-bottom: 1px dashed #d4b16a;
            display: flex;
            justify-content: space-between;
            transition: all 0.2s ease;
            border-radius: 4px;
            margin-bottom: 5px;
        }
        
        .list-item:hover {
            background: #fff;
            padding-left: 15px;
        }
        
        .list-item:last-child {
            border-bottom: none;
        }
        
        .list-detail {
            font-size: 12px;
            color: #8b0000;
        }
        
        .result-text {
            margin-top: 20px;
            padding: 20px;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            border-radius: 8px;
            border: 1px solid #d4b16a;
            line-height: 1.8;
            max-height: none;
            overflow-y: visible;
            font-size: 14px;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
            max-width: 100%;
        }
        
        @media (min-width: 1200px) {
            .result-text {
                padding: 30px;
                font-size: 15px;
            }
        }
        
        .result-text::-webkit-scrollbar {
            width: 8px;
        }
        
        .result-text::-webkit-scrollbar-track {
            background: #f9f3e9;
            border-radius: 4px;
        }
        
        .result-text::-webkit-scrollbar-thumb {
            background: #d4b16a;
            border-radius: 4px;
        }
        
        .result-text::-webkit-scrollbar-thumb:hover {
            background: #8b0000;
        }
        
        /* Markdown样式 */
        .markdown-body {
            color: #333;
            font-family: "Microsoft YaHei", "SimHei", sans-serif;
        }
        
        .markdown-body h1 {
            font-size: 24px;
            font-weight: bold;
            color: #8b0000;
            margin: 20px 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 3px solid #d4b16a;
        }
        
        .markdown-body h2 {
            font-size: 20px;
            font-weight: bold;
            color: #8b0000;
            margin: 18px 0 12px 0;
            padding-bottom: 8px;
            border-bottom: 2px solid #d4b16a;
        }
        
        .markdown-body h3 {
            font-size: 18px;
            font-weight: bold;
            color: #5c3317;
            margin: 15px 0 10px 0;
        }
        
        .markdown-body h4 {
            font-size: 16px;
            font-weight: bold;
            color: #5c3317;
            margin: 12px 0 8px 0;
        }
        
        .markdown-body p {
            margin: 10px 0;
            line-height: 1.8;
        }
        
        .markdown-body ul, .markdown-body ol {
            margin: 10px 0;
            padding-left: 25px;
        }
        
        .markdown-body li {
            margin: 5px 0;
            line-height: 1.8;
        }
        
        .markdown-body table {
            width: 100%;
            max-width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
            background: #fff;
            border-radius: 4px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            table-layout: auto;
        }
        
        @media (min-width: 1200px) {
            .markdown-body {
                max-width: 100%;
                line-height: 1.9;
            }
            
            .markdown-body h1 {
                font-size: 28px;
            }
            
            .markdown-body h2 {
                font-size: 22px;
            }
            
            .markdown-body h3 {
                font-size: 20px;
            }
            
            .markdown-body p, .markdown-body li {
                font-size: 15px;
            }
        }
        
        .markdown-body table th {
            background: linear-gradient(to bottom, #8b0000, #a52a2a);
            color: #fff;
            padding: 12px;
            text-align: left;
            font-weight: bold;
            border: 1px solid #8b0000;
        }
        
        .markdown-body table td {
            padding: 10px 12px;
            border: 1px solid #d4b16a;
            background: #fffaf0;
        }
        
        .markdown-body table tr:nth-child(even) td {
            background: #f9f3e9;
        }
        
        .markdown-body table tr:hover td {
            background: #fff;
        }
        
        .markdown-body strong {
            color: #8b0000;
            font-weight: bold;
        }
        
        .markdown-body hr {
            border: none;
            border-top: 2px solid #d4b16a;
            margin: 20px 0;
        }
        
        .markdown-body code {
            background: #f0f0f0;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: "Consolas", "Monaco", monospace;
            font-size: 13px;
            color: #8b0000;
        }
        
        .markdown-body pre {
            background: #f5f5f5;
            padding: 15px;
            border-radius: 4px;
            overflow-x: auto;
            border: 1px solid #d4b16a;
        }
        
        .markdown-body pre code {
            background: transparent;
            padding: 0;
            color: #333;
        }
        
        .markdown-body blockquote {
            border-left: 4px solid #d4b16a;
            padding-left: 15px;
            margin: 15px 0;
            color: #666;
            font-style: italic;
        }
        
        .markdown-body em {
            color: #5c3317;
            font-style: italic;
        }
        
        footer {
            text-align: center;
            padding: 20px;
            color: #666;
            font-size: 14px;
            border-top: 1px solid #e0d5c0;
            background: #f9f3e9;
        }
        
        .note {
            background: #fffaf0;
            padding: 10px;
            border-radius: 4px;
            border-left: 4px solid #d4b16a;
            margin-top: 15px;
            font-size: 14px;
        }
        
        .additional-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 20px;
            margin-bottom: 1em;
        }
        
        .info-box {
            padding: 15px;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            border-radius: 8px;
            border: 1px solid #d4b16a;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        .info-box:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-color: #8b0000;
        }
        
        .info-title {
            font-weight: bold;
            color: #8b0000;
            margin-bottom: 5px;
        }
        
        .error-message {
            color: #d9534f;
            padding: 12px;
            background: #f8d7da;
            border-radius: 4px;
            margin-top: 10px;
            display: none;
            border-left: 4px solid #d9534f;
            animation: slideIn 0.3s ease;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .container {
                border-radius: 8px;
            }
            
            .main-content {
                padding: 15px;
                gap: 15px;
            }
            
            .input-section {
                padding: 15px;
            }
            
            .result-section {
                padding: 15px;
            }
            
            .bazi-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            
            .additional-info {
                grid-template-columns: 1fr;
            }
            
            .datetime-inputs {
                grid-template-columns: 1fr;
            }
            
            .list-container {
                max-height: 250px;
            }
            
            h1 {
                font-size: 24px;
            }
            
            .subtitle {
                font-size: 14px;
            }
        }
        
        @media (max-width: 480px) {
            .bazi-grid {
                grid-template-columns: 1fr;
            }
            
            .bazi-column {
                padding: 12px;
            }
            
            .bazi-content {
                font-size: 18px;
            }
        }
        
        #copyTextButton {
            background: linear-gradient(to bottom, #5c3317, #8b0000);
        }
        
        #copyTextButton:hover {
            background: linear-gradient(to bottom, #8b0000, #5c3317);
        }
        
        .copy-button-container {
            margin-top: 15px;
        }
        
        .copy-button-container .form-group {
            margin-bottom: 10px;
        }
        
        .bazi-detail-table-container {
            margin: 20px 0;
            overflow-x: auto;
            border: 1px solid #d4b16a;
            border-radius: 8px;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .bazi-detail-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
            background: #fff;
            font-size: 14px;
            min-width: 600px;
        }
        
        @media (min-width: 1200px) {
            .bazi-detail-table {
                min-width: 700px;
            }
        }
        
        .bazi-detail-table th {
            background: linear-gradient(to bottom, #8b0000, #a52a2a);
            color: #fff;
            padding: 12px 8px;
            text-align: center;
            font-weight: bold;
            border: 1px solid #8b0000;
            white-space: nowrap;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .bazi-detail-table th:first-child {
            position: sticky;
            left: 0;
            top: 0;
            z-index: 12;
            background: linear-gradient(to bottom, #8b0000, #a52a2a);
        }
        
        .bazi-detail-table th.pillar-header {
            font-size: 16px;
            min-width: 120px;
        }
        
        .bazi-detail-table td {
            padding: 10px 8px;
            text-align: center;
            border: 1px solid #e0d5c0;
            background: #fffaf0;
            vertical-align: middle;
        }
        
        .bazi-detail-table td.attr-name {
            position: sticky;
            left: 0;
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
            font-weight: bold;
            color: #8b0000;
            z-index: 9;
            border-right: 2px solid #d4b16a;
            text-align: left;
            padding-left: 12px;
            min-width: 100px;
            white-space: nowrap;
        }
        
        .bazi-detail-table tbody tr:nth-child(even) td {
            background: #f9f3e9;
        }
        
        .bazi-detail-table tbody tr:nth-child(even) td.attr-name {
            background: linear-gradient(135deg, #f9f3e9 0%, #fffaf0 100%);
        }
        
        .bazi-detail-table tbody tr:hover td {
            background: #fff;
        }
        
        .bazi-detail-table tbody tr:hover td.attr-name {
            background: linear-gradient(135deg, #f0e8d0 0%, #fff5e1 100%);
        }
        
        .bazi-detail-table .wuxing-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-weight: bold;
            margin: 2px;
            font-size: 12px;
        }
        
        .bazi-detail-table .wuxing-mu {
            background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
            color: #2d5016;
        }
        
        .bazi-detail-table .wuxing-huo {
            background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
            color: #b71c1c;
        }
        
        .bazi-detail-table .wuxing-tu {
            background: linear-gradient(135deg, #efebe9 0%, #d7ccc8 100%);
            color: #5d4037;
        }
        
        .bazi-detail-table .wuxing-jin {
            background: linear-gradient(135deg, #fff8dc 0%, #ffd700 100%);
            color: #b8860b;
        }
        
        .bazi-detail-table .wuxing-shui {
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            color: #0d47a1;
        }
        
        .bazi-detail-table .ganzhi-cell {
            font-size: 18px;
            font-weight: bold;
            color: #5c3317;
        }
        
        /* 天干地支五行颜色 */
        .bazi-detail-table .gan-with-color,
        .bazi-detail-table .zhi-with-color {
            font-size: 16px;
            font-weight: bold;
        }
        
        .bazi-detail-table .gan-with-color.wuxing-mu,
        .bazi-detail-table .zhi-with-color.wuxing-mu {
            color: #2d5016;
        }
        
        .bazi-detail-table .gan-with-color.wuxing-huo,
        .bazi-detail-table .zhi-with-color.wuxing-huo {
            color: #b71c1c;
        }
        
        .bazi-detail-table .gan-with-color.wuxing-tu,
        .bazi-detail-table .zhi-with-color.wuxing-tu {
            color: #5d4037;
        }
        
        .bazi-detail-table .gan-with-color.wuxing-jin,
        .bazi-detail-table .zhi-with-color.wuxing-jin {
            color: #b8860b;
        }
        
        .bazi-detail-table .gan-with-color.wuxing-shui,
        .bazi-detail-table .zhi-with-color.wuxing-shui {
            color: #0d47a1;
        }
        
        .bazi-detail-table .yinyang-inline {
            color: #666;
            font-size: 12px;
            margin-left: 2px;
            font-weight: normal;
        }
        
        /* 藏干容器和项目 */
        .bazi-detail-table .canggan-container {
            display: flex;
            flex-direction: column;
            gap: 4px;
            text-align: center;
        }
        
        .bazi-detail-table .canggan-item {
            font-size: 14px;
            font-weight: bold;
            line-height: 1.4;
        }
        
        .bazi-detail-table .canggan-item.wuxing-mu {
            color: #2d5016;
        }
        
        .bazi-detail-table .canggan-item.wuxing-huo {
            color: #b71c1c;
        }
        
        .bazi-detail-table .canggan-item.wuxing-tu {
            color: #5d4037;
        }
        
        .bazi-detail-table .canggan-item.wuxing-jin {
            color: #b8860b;
        }
        
        .bazi-detail-table .canggan-item.wuxing-shui {
            color: #0d47a1;
        }
        
        @media (min-width: 1200px) {
            .bazi-detail-table .gan-with-color,
            .bazi-detail-table .zhi-with-color {
                font-size: 17px;
            }
        }
        
        .bazi-detail-table .yinyang-cell {
            color: #666;
            font-size: 12px;
        }
        
        .bazi-detail-table .nayin-cell {
            color: #8b0000;
            font-weight: bold;
        }
        
        .bazi-detail-table .canggan-cell {
            font-size: 13px;
            line-height: 1.6;
        }
        
        .bazi-detail-table .shishen-cell {
            font-size: 13px;
            line-height: 1.6;
        }
        
        .bazi-detail-table .dishi-cell {
            font-size: 12px;
            color: #666;
        }
        
        @media (max-width: 768px) {
            .bazi-detail-table-container {
                margin: 15px 0;
                border-radius: 4px;
            }
            
            .bazi-detail-table {
                font-size: 12px;
                min-width: 550px;
            }
            
            .bazi-detail-table th,
            .bazi-detail-table td {
                padding: 8px 6px;
            }
            
            .bazi-detail-table th.pillar-header {
                font-size: 14px;
                min-width: 100px;
            }
            
            .bazi-detail-table td.attr-name {
                font-size: 12px;
                min-width: 80px;
                padding-left: 8px;
            }
            
            .bazi-detail-table .ganzhi-cell {
                font-size: 16px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>八字排盘</h1>
            <div class="subtitle">AI八字分析辅助工具，提供八字信息总结文本</div>
        </header>
        
        <div class="main-content">
            <div class="input-section" id="inputSection">
                <div class="input-section-header" id="inputSectionHeader">
                    <h2>生辰信息</h2>
                    <span class="toggle-icon">▼</span>
                </div>
                <div class="input-section-content">
                <div class="form-group">
                    <label>日历类型</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="solar" name="calendarType" value="公历" checked>
                            <label for="solar">公历</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="lunar" name="calendarType" value="农历">
                            <label for="lunar">农历</label>
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <label>出生日期</label>
                    <div class="datetime-inputs">
                        <div class="date-input">
                            <input type="text" id="datePicker" placeholder="选择日期" readonly>
                        </div>
                        <div class="time-input">
                            <input type="text" id="timePicker" placeholder="选择时间" readonly>
                        </div>
                    </div>
                    <input type="hidden" id="year">
                    <input type="hidden" id="month">
                    <input type="hidden" id="day">
                    <input type="hidden" id="hour">
                    <input type="hidden" id="minute">
                    <input type="hidden" id="second" value="0">
                </div>
                
                <div class="form-group">
                    <label>性别</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="male" name="gender" value="男" checked>
                            <label for="male">男</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="female" name="gender" value="女">
                            <label for="female">女</label>
                        </div>
                    </div>
                </div>
                
                <div class="form-group">
                    <label>排盘流派</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="sect1" name="sect" value="1">
                            <label for="sect1">流派一</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="sect2" name="sect" value="2" checked>
                            <label for="sect2">流派二（默认）</label>
                        </div>
                    </div>
                    <div class="note">
                        流派一：晚子时日柱算明天<br>
                        流派二：晚子时日柱算当天<br>
                        两种流派都认为晚子时时柱算明天
                    </div>
                </div>
                
                <div class="form-group">
                    <label>是否显示小运</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="showXiaoyun" name="showXiaoyun" value="true" checked>
                            <label for="showXiaoyun">显示</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="hideXiaoyun" name="showXiaoyun" value="false">
                            <label for="hideXiaoyun">不显示</label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label>是否显示流年</label>
                    <div class="radio-group">
                        <div class="radio-option">
                            <input type="radio" id="showYear" name="showYear" value="true" checked>
                            <label for="showYear">显示</label>
                        </div>
                        <div class="radio-option">
                            <input type="radio" id="hideYear" name="showYear" value="false">
                            <label for="hideYear">不显示</label>
                        </div>
                    </div>
                </div>
                
                <div class="error-message" id="errorMessage"></div>
                
                <button id="calculateBtn">
                    <span id="buttonText">开始排盘</span>
                    <span class="loading-spinner" id="loadingSpinner"></span>
                </button>
                </div>
            </div>
            
            <div class="result-section">
                <h2>排盘结果</h2>
                <div class="result-box">
                    <div class="result-header">四柱八字</div>
                    <div class="bazi-grid">
                        <div class="bazi-column">
                            <div class="bazi-title">年柱</div>
                            <div class="bazi-content" id="yearPillar">--</div>
                            <div class="bazi-detail" id="yearDetail">--</div>
                            <div class="wuxing" id="yearWuxing">--</div>
                        </div>
                        <div class="bazi-column">
                            <div class="bazi-title">月柱</div>
                            <div class="bazi-content" id="monthPillar">--</div>
                            <div class="bazi-detail" id="monthDetail">--</div>
                            <div class="wuxing" id="monthWuxing">--</div>
                        </div>
                        <div class="bazi-column">
                            <div class="bazi-title">日柱</div>
                            <div class="bazi-content" id="dayPillar">--</div>
                            <div class="bazi-detail" id="dayDetail">--</div>
                            <div class="wuxing" id="dayWuxing">--</div>
                        </div>
                        <div class="bazi-column">
                            <div class="bazi-title">时柱</div>
                            <div class="bazi-content" id="hourPillar">--</div>
                            <div class="bazi-detail" id="hourDetail">--</div>
                            <div class="wuxing" id="hourWuxing">--</div>
                        </div>
                    </div>
                    
                    <div class="additional-info">
                        <div class="info-box">
                            <div class="info-title">命主（日主）</div>
                            <div id="mingzhu">--</div>
                        </div>
                    </div>
                    
                    <div class="result-header result-header-spacing">八字详细信息表</div>
                    <div id="baziDetailTable" class="bazi-detail-table-container"></div>
                    
                    <div class="result-header result-header-spacing">起运信息</div>
                    <div id="qiyunInfo">--</div>
                    
                    <div class="dayun-list">
                        <div class="list-title">大运列表</div>
                        <div class="list-container" id="dayunList">
                            <div class="list-item"><span>--</span><span>--</span></div>
                        </div>
                    </div>
                    
                    <div class="liunian-list">
                        <div class="list-title">流年列表</div>
                        <div class="list-container" id="liunianList">
                            <div class="list-item"><span>--</span><span>--</span></div>
                        </div>
                    </div>
                    
                    <div class="copy-button-container">
                        <div class="form-group">
                            <label>复制文本类型</label>
                            <div class="radio-group">
                                <div class="radio-option">
                                    <input type="radio" id="copyMarkdown" name="copyType" value="markdown" checked>
                                    <label for="copyMarkdown">Markdown</label>
                                </div>
                                <div class="radio-option">
                                    <input type="radio" id="copyJSON" name="copyType" value="json">
                                    <label for="copyJSON">JSON</label>
                                </div>
                                <div class="radio-option">
                                    <input type="radio" id="copyBoth" name="copyType" value="both">
                                    <label for="copyBoth">Markdown + JSON</label>
                                </div>
                            </div>
                        </div>
                        <button id="copyTextButton">
                            <span>📋 复制文本</span>
                        </button>
                    </div>
                    <div class="result-text markdown-body" id="resultText">
请填写生辰信息后点击"开始排盘"按钮
                    </div>
                </div>
            </div>
        </div>
        
        <footer>
            <p>© 2025 cyue.net | 本工具仅供参考，不作为实际命理推断依据</p>
        </footer>
    </div>

</body>
</html>

